﻿//PlazaBaseOrdersColumns.cs
//Copyright (c) 2013 StockSharp LLC, all rights reserved.
//This code module is part of StockSharp library.
//This code is licensed under the GNU GENERAL PUBLIC LICENSE Version 3.
//See the file License.txt for the license details.
//More info on: http://stocksharp.com

namespace StockSharp.Plaza.Metadata
{
	using System;

	/// <summary>
	/// Колонки таблицы, содержащей базовую информацию о заявках.
	/// </summary>
	public abstract class PlazaBaseOrdersColumns : PlazaColumns
	{
		internal PlazaBaseOrdersColumns(string tableId)
			: base(tableId)
		{
			OrderId = new PlazaColumn(TableId, "id_ord", typeof(long));
			SessionId = new PlazaColumn(TableId, "sess_id", typeof(int));
			Moment = new PlazaColumn(TableId, "moment", typeof(DateTime));
			Status = new PlazaColumn(TableId, "status", typeof(int));
			Action = new PlazaColumn(TableId, "action", "i1");
			IsinId = new PlazaColumn(TableId, "isin_id", typeof(int));
			Direction = new PlazaColumn(TableId, "dir", typeof(bool));
			Price = new PlazaColumn(TableId, "price", "d16.5");
			AmountOperation = new PlazaColumn(TableId, "amount", typeof(int));
			AmountRest = new PlazaColumn(TableId, "amount_rest", typeof(int));
		}

		/// <summary>
		/// Номер заявки.
		/// </summary>
		public readonly PlazaColumn OrderId;

		/// <summary>
		/// Идентификатор торговой сессии.
		/// </summary>
		public readonly PlazaColumn SessionId;

		/// <summary>
		/// Время изменения состояния заявки.
		/// </summary>
		public readonly PlazaColumn Moment;

		/// <summary>
		/// Статус заявки.
		/// </summary>
		public readonly PlazaColumn Status;

		/// <summary>
		/// Действие с заявкой.
		/// </summary>
		public readonly PlazaColumn Action;

		/// <summary>
		/// Уникальный числовой идентификатор инструмента.
		/// </summary>
		public readonly PlazaColumn IsinId;

		/// <summary>
		/// Направление.
		/// </summary>
		public readonly PlazaColumn Direction;

		/// <summary>
		/// Цена.
		/// </summary>
		public readonly PlazaColumn Price;

		/// <summary>
		/// Количество в операции.
		/// </summary>
		public readonly PlazaColumn AmountOperation;

		/// <summary>
		/// Оставшееся количество в заявке.
		/// </summary>
		public readonly PlazaColumn AmountRest;
	}
}